<template>
  <div class="detail-key">
    <div class="title">{{ goods.title }}</div>
    <div>
      <p class="new">{{ goods.newPrice }}</p>
      <p class="old">{{ goods.oldPrice }}</p>
      <p v-if="goods.discount" class="discount">{{ goods.discount }}</p>
    </div>
    <div class="tips">
      <p v-for="item in goods.columns">{{ item }}</p>
    </div>
    <div class="service-type">
      <div v-for="item in goods.services" class="services">
        <img :src="item.icon" alt="" />
        <p>{{ item.name }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Detailkey",
  components: {},
  props: {
    goods: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="css" scoped>
.title{
  
}
.detail-key {
  margin-top: 10px;
  width: 100vw;
  height: 35vh;
  display: flex;
  flex-direction: column;
}
.detail-key > div {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 10px;
}
.new {
  color: var(--color-high-text);
  font-size: 24px;
}
.old {
  text-decoration: line-through;
}
.discount {
  padding: 2px 5px;
  background-color: var(--color-high-text);
  border-radius: 10px;
}
.tips {
  display: flex;
  color: #817d7d;
  justify-content: space-between;
  border-bottom: #f6f6f6 2px solid;
}
.service-type{
  border-bottom: 10px solid #f6f6f6;
}
.services {
  display: flex;
  margin: 5px 5px;
  flex: 2;
  align-items: center;
  justify-content: center;
}
.services > img {
  width: 15px;
  height: 15px;
}
</style>